﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace FrogEngine
{
	public interface IGameEntity
	{
		/// <summary>
		/// If your GameEntity inherits from GameEntityBase then simply setting
		/// IsAlive to false will notify all services it is subscribed to that it
		/// has died... if your entity does not inherit from GameEntityBase then 
		/// you need to be sure to fire the IDied event whenever IsAlive is set to 
		/// false.
		/// </summary>
		bool IsAlive { get; set; }
		event EventHandler IDied;

		/// <summary>
		/// A set of all the services this entity is subscribed to.
		/// </summary>
		ISet<IGameEntityService> Services { get; }

		/// <summary>
		/// Gets a specific service of type T from the Services set.
		/// </summary>
		/// <typeparam name="T">Type of service to get</typeparam>
		/// <returns></returns>
		T GetService<T>();
	}
}
